/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import java.util.List;
import pojo.NhapHang;

/**
 *
 * @author User
 */
public class NhapHangDAO extends AbstractDAO{
      public NhapHangDAO() {
        super();
    }

    /**
     * Insert a new NhapHang into the database.
     * @param info
     */
    public void create(NhapHang info) throws DataAccessLayerException {
        super.saveOrUpdate(info);
    }


    /**
     * Delete a detached NhapHang from the database.
     * @param info
     */
    public void delete(NhapHang info) throws DataAccessLayerException {
        super.delete(info);
    }

    /**
     * Find an NhapHang by its primary key.
     * @param id
     * @return
     */
    public NhapHang find(Integer id) throws DataAccessLayerException {
        return (NhapHang) super.find(NhapHang.class, id);
    }

    /**
     * Updates the state of a detached NhapHang.
     *
     * @param info
     */
    public void update(NhapHang info) throws DataAccessLayerException {
        super.saveOrUpdate(info);
    }

    /**
     * Finds all NhapHangs in the database.
     * @return
     */
    public List findAll() throws DataAccessLayerException{
        return super.findAll(NhapHang.class);
    }
}
